package com.ti.srpglife.world.level;

import java.util.HashMap;

import com.ti.srpglife.entity.Unit;

public class LevelLoader 
{
	public static HashMap<String,Level> chunkedLevels = new HashMap<String,Level>();
	
	public static Level load(String path)
	{
		Level l;
		
		if(chunkedLevels.containsKey(path))
		{
			l = chunkedLevels.get(path);
		}
		else
		{
			// set up l
			l = new Level(path);
			
			// add l to chunkedLevels
			chunkedLevels.put(path, l);
		}
		l.addUnit(new Unit());
		// return l
		return l;
	}
	
	public static void clearChunkedLevels()
	{
		chunkedLevels.clear();
	}
}
